package com.cnhonker.edu.system.controller;

import com.cnhonker.edu.core.controller.BaseController;
import com.cnhonker.edu.system.service.SysFunctionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * Created by Apple on 2017/6/9.
 */
@Controller
@RequestMapping("admin/system")
public class SysFunctionController extends BaseController{
    @Autowired
    private SysFunctionService sysFunctionService;
    @RequestMapping("sysfunctionlist")
    public ModelAndView getAllSysFunction(){
        ModelAndView mv=new ModelAndView();
        mv.setViewName("admin/sysfunction/sysFunction");
        mv.addObject("list",gson.toJson(sysFunctionService.queryAllSysFunction()));
        return mv;
    }
}
